package cn.tedu.shoot;

import java.awt.image.BufferedImage;
import java.util.Random;

public class BossBullet extends FlyingObject{
    private int speed;
    public BossBullet(int x,int y){
        super(16,18,x,y);
        speed=(int)(Math.random()*3+2);
    }

    @Override
    public void step() {
        y+=speed;
    }
    public BufferedImage getImage() {
        if(isLive()) {
            return Images.bossbullet;
        }else if(isDead()) {
            state=REMOVE;
        }
        return null;
    }
    public boolean isOutOfBounds() {
        return y>=World.HEIGHT;
    }
}
